// 定义张三定义的reducer
import { ADD } from './contants'
export default function (state = { count: 1 }, action) {
  switch (action.type) {
    case ADD:
      return {
        ...state,
        count: state.count + action.payload,
      }
    default:
      return state
  }
}
